<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'person-date-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'type'); ?>
        <?php echo $form->dropDownList($model,'type',array('O'=>'Once','S'=>'Shift','D'=>'Day','W'=>'Week','M'=>'Month','Y'=>'Year')); ?>
		<?php echo $form->error($model,'type'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'time'); ?>
        <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
				'attribute' => 'time',
				'model'=>$model,
				'language'=>'zh',
				'options' => array(
						'showAnim' => 'fold',
						'dateFormat' => 'yymmdd',
				),
				'htmlOptions'=>array(
					'readonly'=>'readonly'
				),
		));
		?>
		<?php echo $form->error($model,'time'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'style'); ?>
        <?php echo $form->dropDownList($model,'style',array('A'=>'A','B'=>'B','C'=>'C')); ?>
		<?php echo $form->error($model,'style'); ?>
	</div>
    
    <div class="row">
		Template
        <?php echo $form->checkBox($model,'status',array('value'=>100)); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->